home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene 96
/
Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso
/
misc
/
coding
/
5tinydms
/
gouraud.doc
< prev
next >
Wrap
Text File
|
1995-12-03
|
1KB
|
32 lines
This is just a little example for Gema, featuring a Gouraud routine.
It deals with any convex polygon ( with any number of points ) . Although it
isn't that slow, this piece of code was not intended to be optimized at all,
but for a didactive purpose.
The points have to be in clockwise order. In other case, the polygon
is not drawn, as it is supposed to be an hidden face.
As the polygons are filled vertically, this routine can be easily
modified to support a native X-mode. Just change the multiplication table
( multable ) and add some "out" to switch planes in "drawsegment" and it
should be all right.
Be careful if you use this routine in a EXE code, as the latest part
is in a BSS section to reduce the executable size : don't forget to allocate
some space for them ...
This has been assembled by GEMA v2.5 without any extra option.
That's all folks.
Have fun.
Borland sucks.
Tekno rules.
Stop nuclear tests.
Jedi / Sector One
E-Mail: j@nether.net - denis_r@epita.edu